<template>
<view class="" style="width: 100vw;height: 100vh">
		<view class="" :style="{'background':kbackgroundColor2}" style="min-height: 100vh">
		<hx-navbar title="我的钱包" :back="true" :fixed="false" color="#fff" barPlaceholder="hidden" transparent="auto">
			<view @click="$common.navigateTo('/pages/user/wallet/details')" slot="right" class="fsz26 color-f" style="width: 130rpx;">账单详情</view>
		</hx-navbar>
			<image class="bg" src="/static/index/collect_bg.jpg" mode="scaleToFill"></image>
		<view class="content">
			<view class="container">
				<view class="num_title">
					总资产(元)
				</view>
				<view class="wallet_num">
					<text class="fsz36">￥</text>{{info.balance}}
				</view>
				<view class="cell-item-cb">
					<view class="submit_btn2 " @tap="go_withdraw()">
						<text>
							提现
						</text>
					</view>

					<view style="width: 20rpx;"></view>
					<view class="submit_btn" @click="go_recharge()">
						<text>
							充值
						</text>
					</view>
				</view>


			</view>
		</view>
	</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				info: {
					balance: 0.00
				}
			}
		},
		 onPullDownRefresh() {
					setTimeout(function() {
						uni.stopPullDownRefresh()
					}, 1000)
	 	},
		onLoad() {

			this.$api.userInfo({}, res => {
				if (res.status) {
					this.info = res.data;
				}
			})
		},
		methods: {
			go_recharge: function() {
				uni.navigateTo({
					url: 'recharge'
				})
			},

			go_withdraw: function() {
				uni.navigateTo({
					url: 'withdraw_cash'
				})
			}
		},
		onNavigationBarButtonTap() {

			uni.navigateTo({
				url: 'details'
			})
		}
	}
</script>

<style>
	.wallet_btn {
		width: 486rpx;
		height: 90rpx;
		color: #fff;
		background: linear-gradient(313deg, #46C2B8 0%, #7D50B4 100%);
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 36rpx;
		color: #FFFFFF;
		margin: 0 auto;
		margin-bottom: 50rpx;
	}

	.withdraw {
		color: #333;
	}

	.wallet_num {
		width: 100%;
		text-align: center;
		padding-top: 20rpx;
		font-size: 80rpx;
		font-family: DINPro;
		font-weight: bold;
		line-height: 100rpx;
		color: #fff;
		margin-bottom: 90rpx;

	}

	.num_title {
		width: 100%;
		text-align: center;

		font-size: 32rpx;
		font-weight: 400;
		line-height: 45rpx;
		color: #fff;

	}

	.long_bg {
		position: absolute;
		bottom: 0;
		left: 0;
		width: 453rpx;
		height: 480rpx;
		z-index: 0;
	}

	.container {
		padding: 60rpx;
		
		position: relative;
		z-index: 1;
		margin-top: 30rpx;
	}

	.content {
		padding: 0 30rpx;
	}
</style>
